package org.nonsense;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionListener;
import java.awt.event.FocusListener;

import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class AudioRecorderFrame extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JPanel mixerSettingsPanel;
	private JComboBox channelCountComboBox;
	private JProgressBar playbackProgressBar;
	private JTextArea batchCommandTextArea;
	private JCheckBox batchCommandEnabledCheckBox;
	private JLabel timedRecordingToggleButtonLabel;
	private JToggleButton onOffTimedRecordingButton;
	private JTextField filePrefixTextField;
	private JLabel filePrefixLabel;
	private JScrollPane batchCommandScrollPane;
	private JLabel bitsLabel;
	private JLabel khzLabel;
	private JComboBox outputFormatComboBox;
	private JLabel outputFormatLabel;
	private JButton browseArchiveDirectoryButton;
	private JTextField archiveDirectoryTextField;
	private JLabel archiveDirectoryLabel;
	private JPanel batchCommandPanel;
	private JLabel nextRecordingTimeLabel;
	private JLabel nextRecordLabel;
	private JPanel outputConfigPanel;
	private JComboBox timedRecordingDaysComboBox;
	private JLabel timedRecordingDaysLabel;
	private JLabel endTimeLabel;
	private JCheckBox endTimePMCheckBox;
	private JTextField endTimeTextField;
	private JCheckBox startTimePMCheckBox;
	private JTextField startTimeTextField;
	private JLabel startTimeLabel;
	private JPanel timedRecordingPanel;
	private JCheckBox signedCheckBox;
	private JComboBox sampleSizeComboBox;
	private JCheckBox bigEndianCheckBox;
	private JLabel sampleSizeLabel;
	private JLabel mixerSelectionLabel;
	private JLabel channelCountLabel;
	private JLabel sampleRateLabel;
	private JComboBox sampleRateComboBox;
	private JComboBox mixerSelectComboBox;
	private JButton playbackButton;
	private JButton stopRecordButton;
	private JButton recordButton;
	
	private TimeInputVerifier timeInputVerifier;
	
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				AudioRecorderFrame inst = new AudioRecorderFrame();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public AudioRecorderFrame() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
			setTitle("AudioRecorder");
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setLayout(null);
				jPanel1.setPreferredSize(new java.awt.Dimension(459, 340));
				{
					recordButton = new JButton();
					jPanel1.add(recordButton);
					recordButton.setText("Record");
					recordButton.setBounds(12, 482, 77, 22);
					recordButton.setActionCommand("recordButton");
				}
				{
					stopRecordButton = new JButton();
					jPanel1.add(stopRecordButton);
					stopRecordButton.setText("Stop");
					stopRecordButton.setBounds(94, 482, 64, 22);
					stopRecordButton.setActionCommand("stopRecordButton");
				}
				{
					playbackButton = new JButton();
					jPanel1.add(playbackButton);
					playbackButton.setText("Playback");
					playbackButton.setBounds(163, 482, 94, 22);
					playbackButton.setActionCommand("playbackButton");
				}
				{
					ComboBoxModel mixerSelectComboBoxModel = new DefaultComboBoxModel(new String[]{"No Mixers Have Been Populated Yet"});
					mixerSelectComboBox = new JComboBox();
					jPanel1.add(mixerSelectComboBox);
					mixerSelectComboBox.setModel(mixerSelectComboBoxModel);
					mixerSelectComboBox.setBounds(49, 12, 442, 22);
					mixerSelectComboBox.setActionCommand("mixerSelectComboBox");
				}
				{
					mixerSettingsPanel = new JPanel();
					jPanel1.add(mixerSettingsPanel);
					mixerSettingsPanel.setBounds(12, 37, 199, 129);
					mixerSettingsPanel.setBorder(BorderFactory.createTitledBorder("Mixer Settings"));
					mixerSettingsPanel.setLayout(null);
					{
						sampleRateLabel = new JLabel();
						mixerSettingsPanel.add(sampleRateLabel);
						sampleRateLabel.setText("Sample Rate");
						sampleRateLabel.setBounds(8, 23, 74, 15);
					}
					{
						ComboBoxModel sampleRateComboBoxModel = 
								new DefaultComboBoxModel( new String[] {  "44100", "22050", "16000", "11025", "8000" });
						sampleRateComboBox = new JComboBox();
						mixerSettingsPanel.add(sampleRateComboBox);
						sampleRateComboBox.setModel(sampleRateComboBoxModel);
						sampleRateComboBox.setBounds(82, 18, 76, 22);
						sampleRateComboBox.setActionCommand("sampleRateComboBox");
					}
					{
						channelCountLabel = new JLabel();
						mixerSettingsPanel.add(channelCountLabel);
						channelCountLabel.setText("Channels");
						channelCountLabel.setBounds(8, 78, 74, 15);
					}
					{
						ComboBoxModel channelCountComboBoxModel = new DefaultComboBoxModel(new String[] { "2", "1" });
						channelCountComboBox = new JComboBox();
						mixerSettingsPanel.add(channelCountComboBox);
						channelCountComboBox.setModel(channelCountComboBoxModel);
						channelCountComboBox.setBounds(82, 73, 76, 22);
						channelCountComboBox.setActionCommand("channelCountComboBox");
					}
					{
						bigEndianCheckBox = new JCheckBox();
						mixerSettingsPanel.add(bigEndianCheckBox);
						bigEndianCheckBox.setText("Big Endian");
						bigEndianCheckBox.setBounds(22, 100, 87, 19);
						bigEndianCheckBox.setActionCommand("bigEndianCheckBox");
					}
					{
						sampleSizeLabel = new JLabel();
						mixerSettingsPanel.add(sampleSizeLabel);
						sampleSizeLabel.setText("Sample Size");
						sampleSizeLabel.setBounds(8, 50, 74, 15);
					}
					{
						ComboBoxModel sampleSizeComboBoxModel = new DefaultComboBoxModel(new String[] { "16", "8" });
						sampleSizeComboBox = new JComboBox();
						mixerSettingsPanel.add(sampleSizeComboBox);
						sampleSizeComboBox.setModel(sampleSizeComboBoxModel);
						sampleSizeComboBox.setBounds(82, 45, 76, 22);
						sampleSizeComboBox.setActionCommand("sampleSizeComboBox");
					}
					{
						signedCheckBox = new JCheckBox();
						mixerSettingsPanel.add(signedCheckBox);
						{
							khzLabel = new JLabel();
							mixerSettingsPanel.add(khzLabel);
							khzLabel.setText("Khz");
							khzLabel.setBounds(164, 23, 28, 15);
						}
						{
							bitsLabel = new JLabel();
							mixerSettingsPanel.add(bitsLabel);
							bitsLabel.setText("Bits");
							bitsLabel.setBounds(164, 50, 39, 15);
						}
						signedCheckBox.setText("Signed");
						signedCheckBox.setBounds(120, 100, 74, 19);
						signedCheckBox.setSelected(true);
						signedCheckBox.setActionCommand("signedCheckBox");
					}
				}
				{
					mixerSelectionLabel = new JLabel();
					jPanel1.add(mixerSelectionLabel);
					mixerSelectionLabel.setText("Mixer");
					mixerSelectionLabel.setBounds(12, 16, 36, 15);
				}
				{
					timedRecordingPanel = new JPanel();
					jPanel1.add(timedRecordingPanel);
					timedRecordingPanel.setBounds(217, 36, 274, 145);
					timedRecordingPanel.setBorder(BorderFactory.createTitledBorder("Timed Recording"));
					timedRecordingPanel.setLayout(null);
					{
						startTimeLabel = new JLabel();
						timedRecordingPanel.add(startTimeLabel);
						startTimeLabel.setText("Start recording at...");
						startTimeLabel.setBounds(6, 22, 120, 15);
						startTimeLabel.setHorizontalAlignment(SwingConstants.RIGHT);
					}
					{
						startTimeTextField = new JTextField();
						timedRecordingPanel.add(startTimeTextField);
						startTimeTextField.setText("12:01");
						startTimeTextField.setBounds(137, 19, 79, 22);
						startTimeTextField.setName("startTimeTextField");
						startTimeTextField.setInputVerifier(new TimeInputVerifier());
					}
					{
						startTimePMCheckBox = new JCheckBox();
						timedRecordingPanel.add(startTimePMCheckBox);
						startTimePMCheckBox.setText("PM");
						startTimePMCheckBox.setBounds(222, 20, 49, 19);
						startTimePMCheckBox.setActionCommand("startTimePMCheckBox");
					}
					{
						endTimeTextField = new JTextField();
						timedRecordingPanel.add(endTimeTextField);
						endTimeTextField.setText("12:05");
						endTimeTextField.setBounds(137, 46, 79, 22);
						endTimeTextField.setActionCommand("endTimeTextField");
						endTimeTextField.setInputVerifier(new TimeInputVerifier());
						endTimeTextField.setName("endTimeTextField");
					}
					{
						endTimePMCheckBox = new JCheckBox();
						timedRecordingPanel.add(endTimePMCheckBox);
						endTimePMCheckBox.setText("PM");
						endTimePMCheckBox.setBounds(222, 47, 49, 19);
						endTimePMCheckBox.setActionCommand("endTimePMCheckBox");
					}
					{
						endTimeLabel = new JLabel();
						timedRecordingPanel.add(endTimeLabel);
						endTimeLabel.setText("Stop recording at...");
						endTimeLabel.setBounds(11, 49, 115, 15);
						endTimeLabel.setHorizontalAlignment(SwingConstants.RIGHT);
					}
					{
						timedRecordingDaysLabel = new JLabel();
						timedRecordingPanel.add(timedRecordingDaysLabel);
						timedRecordingDaysLabel.setText("On days...");
						timedRecordingDaysLabel.setBounds(9, 78, 117, 15);
						timedRecordingDaysLabel.setHorizontalAlignment(SwingConstants.RIGHT);
					}
					{
						ComboBoxModel timedRecordingDaysComboBoxModel = 
								new DefaultComboBoxModel(
									new String[] { "Today Only", "Every day", "Mon - Fri", "Sat & Sun", "Sun - Thu", 
												   "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" });
						timedRecordingDaysComboBox = new JComboBox();
						timedRecordingPanel.add(timedRecordingDaysComboBox);
						{
							nextRecordLabel = new JLabel();
							timedRecordingPanel.add(nextRecordLabel);
							nextRecordLabel.setText("Next recording in...");
							nextRecordLabel.setBounds(3, 102, 123, 15);
							nextRecordLabel.setHorizontalAlignment(SwingConstants.RIGHT);
						}
						{
							nextRecordingTimeLabel = new JLabel();
							timedRecordingPanel.add(nextRecordingTimeLabel);
							nextRecordingTimeLabel.setText("1d, 5h, 16m, 33s");
							nextRecordingTimeLabel.setBounds(127, 102, 134, 15);
							nextRecordingTimeLabel.setHorizontalAlignment(SwingConstants.RIGHT);
						}
						{
							onOffTimedRecordingButton = new JToggleButton();
							timedRecordingPanel.add(onOffTimedRecordingButton);
							onOffTimedRecordingButton.setText("Disabled");
							onOffTimedRecordingButton.setBounds(138, 123, 123, 16);
							onOffTimedRecordingButton.setActionCommand("onOffTimedRecordingButton");
						}
						{
							timedRecordingToggleButtonLabel = new JLabel();
							timedRecordingPanel.add(timedRecordingToggleButtonLabel);
							timedRecordingToggleButtonLabel.setText("Timed Recording is...");
							timedRecordingToggleButtonLabel.setBounds(3, 123, 123, 15);
							timedRecordingToggleButtonLabel.setHorizontalAlignment(SwingConstants.RIGHT);
						}
						timedRecordingDaysComboBox.setModel(timedRecordingDaysComboBoxModel);
						timedRecordingDaysComboBox.setBounds(137, 74, 125, 22);
						timedRecordingDaysComboBox.setActionCommand("timedRecordingDaysComboBox");
					}
				}
				{
					playbackProgressBar = new JProgressBar();
					jPanel1.add(playbackProgressBar);
					playbackProgressBar.setBounds(12, 508, 336, 13);
				}
				{
					outputConfigPanel = new JPanel();
					jPanel1.add(outputConfigPanel);
					outputConfigPanel.setBounds(12, 178, 479, 131);
					outputConfigPanel.setBorder(BorderFactory.createTitledBorder("Output Settings"));
					outputConfigPanel.setLayout(null);
					{
						archiveDirectoryLabel = new JLabel();
						outputConfigPanel.add(archiveDirectoryLabel);
						archiveDirectoryLabel.setText("Archive Directory");
						archiveDirectoryLabel.setBounds(10, 19, 98, 15);
					}
					{
						archiveDirectoryTextField = new JTextField();
						outputConfigPanel.add(archiveDirectoryTextField);
						archiveDirectoryTextField.setText("F:\\FLACArchive");
						archiveDirectoryTextField.setBounds(113, 14, 260, 22);
						archiveDirectoryTextField.setActionCommand("archiveDirectoryTextField");
						archiveDirectoryTextField.setName("archiveDirectoryTextField");
					}
					{
						browseArchiveDirectoryButton = new JButton();
						outputConfigPanel.add(browseArchiveDirectoryButton);
						browseArchiveDirectoryButton.setText("Browse");
						browseArchiveDirectoryButton.setBounds(379, 14, 91, 22);
						browseArchiveDirectoryButton.setActionCommand("browseArchiveDirectoryButton");
					}
					{
						outputFormatLabel = new JLabel();
						outputConfigPanel.add(outputFormatLabel);
						outputFormatLabel.setText("Output Format");
						outputFormatLabel.setBounds(299, 46, 98, 15);
						outputFormatLabel.setHorizontalAlignment(SwingConstants.RIGHT);
					}
					{
						ComboBoxModel outputFormatComboBoxModel = new DefaultComboBoxModel(new String[] { "FLAC", "WAV" });
						outputFormatComboBox = new JComboBox();
						outputConfigPanel.add(outputFormatComboBox);
						{
							filePrefixLabel = new JLabel();
							outputConfigPanel.add(filePrefixLabel);
							filePrefixLabel.setText("File Prefix");
							filePrefixLabel.setBounds(10, 47, 67, 15);
						}
						{
							filePrefixTextField = new JTextField();
							outputConfigPanel.add(filePrefixTextField);
							filePrefixTextField.setText("audioRecording");
							filePrefixTextField.setBounds(75, 42, 227, 22);
							filePrefixTextField.setName("filePrefixTextField");
						}
						outputFormatComboBox.setModel(outputFormatComboBoxModel);
						outputFormatComboBox.setBounds(409, 41, 61, 22);
						outputFormatComboBox.setActionCommand("outputFormatComboBox");
					}
				}
				{
					batchCommandPanel = new JPanel();
					jPanel1.add(batchCommandPanel);
					batchCommandPanel.setBounds(12, 309, 479, 167);
					batchCommandPanel.setBorder(BorderFactory.createTitledBorder("Batch Command"));
					batchCommandPanel.setLayout(null);
					{
						batchCommandScrollPane = new JScrollPane();
						batchCommandPanel.add(batchCommandScrollPane);
						batchCommandScrollPane.setBounds(5, 32, 469, 130);
						{
							batchCommandTextArea = new JTextArea();
							batchCommandTextArea.setName("batchCommandTextArea");
							String defaultBatchString = "C:\\Users\\derek\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe http://www.iheart.com/live/177/?autoplay=true";
							batchCommandTextArea.setText(defaultBatchString);
							batchCommandScrollPane.setViewportView(batchCommandTextArea);
							batchCommandScrollPane.setName("batchCommandScrollPane");
						}
					}
					{
						batchCommandEnabledCheckBox = new JCheckBox();
						batchCommandPanel.add(batchCommandEnabledCheckBox);
						batchCommandEnabledCheckBox.setText("Enabled");
						batchCommandEnabledCheckBox.setBounds(11, 14, 80, 19);
						batchCommandEnabledCheckBox.setName("batchCommandEnabledCheckBox");
						batchCommandEnabledCheckBox.setActionCommand("batchCommandEnabledCheckBox");
					}
				}
			}
			pack();
			this.setSize(519, 561);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public JCheckBox getBatchCommandEnabledCheckBox() {
		return batchCommandEnabledCheckBox;
	}

	public void setBatchCommandEnabledCheckBox(JCheckBox batchCommandEnabledCheckBox) {
		this.batchCommandEnabledCheckBox = batchCommandEnabledCheckBox;
	}

	public void updateMixerComboBox(Object[] data)	{
		DefaultComboBoxModel dcbm = new DefaultComboBoxModel(data);
		this.mixerSelectComboBox.setModel(dcbm);
	}
	
	
	public JComboBox getChannelCountComboBox() {
		return channelCountComboBox;
	}

	public void setChannelCountComboBox(JComboBox channelCountComboBox) {
		this.channelCountComboBox = channelCountComboBox;
	}

	public JProgressBar getPlaybackProgressBar() {
		return playbackProgressBar;
	}

	public void setPlaybackProgressBar(JProgressBar playbackProgressBar) {
		this.playbackProgressBar = playbackProgressBar;
	}

	public JComboBox getOutputFormatComboBox() {
		return outputFormatComboBox;
	}

	public void setOutputFormatComboBox(JComboBox outputFormatComboBox) {
		this.outputFormatComboBox = outputFormatComboBox;
	}

	public JButton getBrowseArchiveDirectoryButton() {
		return browseArchiveDirectoryButton;
	}

	public void setBrowseArchiveDirectoryButton(JButton browseArchiveDirectoryButton) {
		this.browseArchiveDirectoryButton = browseArchiveDirectoryButton;
	}

	public JTextField getArchiveDirectoryTextField() {
		return archiveDirectoryTextField;
	}

	public void setArchiveDirectoryTextField(JTextField archiveDirectoryTextField) {
		this.archiveDirectoryTextField = archiveDirectoryTextField;
	}

	public JComboBox getTimedRecordingDaysComboBox() {
		return timedRecordingDaysComboBox;
	}

	public void setTimedRecordingDaysComboBox(JComboBox timedRecordingDaysComboBox) {
		this.timedRecordingDaysComboBox = timedRecordingDaysComboBox;
	}

	public JCheckBox getEndTimePMCheckBox() {
		return endTimePMCheckBox;
	}

	public void setEndTimePMCheckBox(JCheckBox endTimePMCheckBox) {
		this.endTimePMCheckBox = endTimePMCheckBox;
	}

	public JTextField getEndTimeTextField() {
		return endTimeTextField;
	}

	public void setEndTimeTextField(JTextField endTimeTextField) {
		this.endTimeTextField = endTimeTextField;
	}

	public JCheckBox getStartTimePMCheckBox() {
		return startTimePMCheckBox;
	}

	public void setStartTimePMCheckBox(JCheckBox startTimePMCheckBox) {
		this.startTimePMCheckBox = startTimePMCheckBox;
	}

	public JTextField getStartTimeTextField() {
		return startTimeTextField;
	}

	public void setStartTimeTextField(JTextField startTimeTextField) {
		this.startTimeTextField = startTimeTextField;
	}

	public JCheckBox getSignedCheckBox() {
		return signedCheckBox;
	}

	public void setSignedCheckBox(JCheckBox signedCheckBox) {
		this.signedCheckBox = signedCheckBox;
	}

	public JComboBox getSampleSizeComboBox() {
		return sampleSizeComboBox;
	}

	public void setSampleSizeComboBox(JComboBox sampleSizeComboBox) {
		this.sampleSizeComboBox = sampleSizeComboBox;
	}

	public JCheckBox getBigEndianCheckBox() {
		return bigEndianCheckBox;
	}

	public void setBigEndianCheckBox(JCheckBox bigEndianCheckBox) {
		this.bigEndianCheckBox = bigEndianCheckBox;
	}

	public JComboBox getSampleRateComboBox() {
		return sampleRateComboBox;
	}

	public void setSampleRateComboBox(JComboBox sampleRateComboBox) {
		this.sampleRateComboBox = sampleRateComboBox;
	}

	public JComboBox getMixerSelectComboBox() {
		return mixerSelectComboBox;
	}

	public void setMixerSelectComboBox(JComboBox mixerSelectComboBox) {
		this.mixerSelectComboBox = mixerSelectComboBox;
	}

	public JButton getPlaybackButton() {
		return playbackButton;
	}

	public void setPlaybackButton(JButton playbackButton) {
		this.playbackButton = playbackButton;
	}

	public JButton getStopRecordButton() {
		return stopRecordButton;
	}

	public void setStopRecordButton(JButton stopRecordButton) {
		this.stopRecordButton = stopRecordButton;
	}

	public JButton getRecordButton() {
		return recordButton;
	}

	public void setRecordButton(JButton recordButton) {
		this.recordButton = recordButton;
	}
	
	public JTextArea getBatchCommandTextArea() {
		return batchCommandTextArea;
	}

	public void setBatchCommandTextArea(JTextArea batchCommandTextArea) {
		this.batchCommandTextArea = batchCommandTextArea;
		batchCommandTextArea.setPreferredSize(new java.awt.Dimension(466, 112));
	}

	public JTextField getFilePrefixTextField() {
		return filePrefixTextField;
	}

	public void setFilePrefixTextField(JTextField filePrefixTextField) {
		this.filePrefixTextField = filePrefixTextField;
	}

	public void setActionListener(ActionListener aListener)	{
		recordButton.addActionListener(aListener);
		stopRecordButton.addActionListener(aListener);
		playbackButton.addActionListener(aListener);
		mixerSelectComboBox.addActionListener(aListener);
		sampleRateComboBox.addActionListener(aListener);
		channelCountComboBox.addActionListener(aListener);
		bigEndianCheckBox.addActionListener(aListener);
		sampleSizeComboBox.addActionListener(aListener);
		signedCheckBox.addActionListener(aListener);
		startTimeTextField.addActionListener(aListener);
		startTimePMCheckBox.addActionListener(aListener);
		endTimeTextField.addActionListener(aListener);
		endTimePMCheckBox.addActionListener(aListener);
		timedRecordingDaysComboBox.addActionListener(aListener);
		archiveDirectoryTextField.addActionListener(aListener);
		browseArchiveDirectoryButton.addActionListener(aListener);
		outputFormatComboBox.addActionListener(aListener);
		onOffTimedRecordingButton.addActionListener(aListener);
		batchCommandEnabledCheckBox.addActionListener(aListener);

		// set focus listeners
		startTimeTextField.addFocusListener((FocusListener)aListener);
		endTimeTextField.addFocusListener((FocusListener)aListener);
		batchCommandTextArea.addFocusListener((FocusListener)aListener);
		batchCommandScrollPane.addFocusListener((FocusListener)aListener);
		filePrefixTextField.addFocusListener((FocusListener)aListener);
		archiveDirectoryTextField.addFocusListener((FocusListener)aListener);
	}
	
	public JLabel getNextRecordingTimeLabel() {
		return nextRecordingTimeLabel;
	}

	public void setNextRecordingTimeLabel(JLabel nextRecordingTimeLabel) {
		this.nextRecordingTimeLabel = nextRecordingTimeLabel;
	}

	public void setOutputTypes(Object[] data)	{
		DefaultComboBoxModel dcbm = new DefaultComboBoxModel(data);
		this.outputFormatComboBox.setModel(dcbm);
	}
	
	public void setCaptureMode()	{
		this.recordButton.setEnabled(false);
		this.stopRecordButton.setEnabled(true);
		this.playbackButton.setEnabled(false);
		this.repaint();
	}
	
	public void setIdleMode()	{
		this.recordButton.setEnabled(true);
		this.stopRecordButton.setEnabled(false);
		this.playbackButton.setEnabled(true);
		this.repaint();
	}
	
	public void setNoPlaybackMode()	{
		this.recordButton.setEnabled(true);
		this.stopRecordButton.setEnabled(false);
		this.playbackButton.setEnabled(false);
		this.repaint();
	}
	
	public void setPlaybackMode()	{
		this.recordButton.setEnabled(false);
		this.stopRecordButton.setEnabled(true);
		this.playbackButton.setEnabled(false);
		this.repaint();
	}

	public void toggleTimedRecording(String text) {
		this.onOffTimedRecordingButton.setText(text);
	}
	
}
